<%--
  User: zjzhai
  Date: 13-11-20
  Time: 下午5:40
--%>

<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
  <title></title>
</head>
<body>
<g:form controller="post" action="publish" method="post" useToken="true">
     标题：<g:textField name="title" value="${article?.title}"/>
    <br/>
    作者:<g:textField name="author" value="${article?.author}"/>
    <br/>
    分类：<g:select name="category.id" from="${category}" value="${article?.category?.id}" optionKey="id" optionValue="name"></g:select>
   <br/>
    内容：<g:textArea name="content">
        ${article?.content}
    </g:textArea>
    置顶：
        是<g:radio name="top" value="true" onclick="topChange()"/><br/>
        否<g:radio name="top" value="false" onclick="topChange()"/>
    <g:submitButton name="publish">确定</g:submitButton>
</g:form>

<script type="text/javascript">
    function topChange(){
        var topValue = $('input[name="top"]')

        console.log(11111);
    }
</script>



</body>
</html>